#pragma once
#include "SDL.h"
#include "SDL_image.h"

class monitokun
{
private:
	int HEIGHT; 
	int WEIGHT;

	int MOVE_LEFT;
	int MOVE_RIGTH;
	int MOVE_UP;
	int MOVE_DOWN;

	int loops;

	static bool instance;
	static monitokun *monito;
	monitokun()
	{ 
		offset.x =0; 
		offset.y=0;
		state=0;

		HEIGHT = 22; 
		WEIGHT = 22;

		MOVE_LEFT = 1;
		MOVE_RIGTH = 2;
		MOVE_UP = 3;
		MOVE_DOWN = 4;

		loops = 0;
	};

	int state;

public:
	//static monitokun * getInstance();
	~monitokun()
	{
		instance = false;
	};

	static monitokun *monitokun::getInstance()
	{
		if(!instance)
		{
			monito = new monitokun();
			instance = true;
			return monito;
		}
		else
		{
			return monito;
		}
	}
	void characterToLoad(char *img);
	void draw(SDL_Surface *screen);
	void update(SDL_Surface *screen);
	void setFree();
	void move(char *whatyouredoing);
	SDL_Rect rect();

	void updateKeys();//Uint8 *keys);//monitor keyboard

	SDL_Surface *player;
	SDL_Rect offset;
	//The event structure
	SDL_Event event;
	//capture key's of keyboard
	Uint8 *keys;

};

